/**
 * Created by charlie on 18-1-15.
 */
import React from 'react'
import UI from '../components/stateTracking'
import {connect} from 'dva-no-router'
import {bindActionCreators} from 'redux'
import {View} from 'react-native'

class StateTracking extends React.Component {
    componentWillUnmount(){
        const {getClean}=this.props;
        getClean();
    }
    componentWillMount(){
        const {getStateTracking}=this.props;
        getStateTracking();
    }
    render(){
        return(
            <UI  {...this.props} />
        )
    }
}

const actions ={
    getStateTracking:() =>({type:'stateTracking/getStateTracking'}),
    getClean:() =>({type:'stateTracking/getClean'}),
};
const mapProps = ({stateTracking}) =>({stateTracking});
const mapActions = dispatch =>({
    ...bindActionCreators({...actions},dispatch)
});
export default connect (mapProps,mapActions)(StateTracking)